package main

//多线程处理值
func main() {
	ch := make(chan int)
	go testChannel(ch)
	v := <-ch
	println("v1--->", v)
	v = <-ch
	println("v2--->", v)
	go testChannel2(ch)
	v = <-ch
	println("v2--->", v)
}

func testChannel(chanV chan int) {
	chanV <- 1
	chanV <- 10
}

func testChannel2(chanV chan int) {
	chanV <- 20
}
